<?php
/* Kernel administration 
	by infoxp
	Kernel vers 1.2 
	rev 2 le 23/09/2012 par infoxp
*/

setPageTitle("Administration du site " . SITE_NAME);
	//require_once('./includes/constantes.inc.php');      

//Niveau de visibilité admin , autorise pas les non connecté et compare le level avec le signe >= grace au dernier true
//auth(ADMIN,false,true); en commentaire car fait depuis les autres pages
//var_dump($GLOBALS["_msg"]);

     			// ici on affiche un texte en hut de la page pour le changer c'esty dans modules/message_haut.php
echo '' . Index_admin . '<br />';


if(defined("DEBUG") && DEBUG){
}
         // ce code il devrait afficher le texte du haut 
        //echo $_tab['message_index_admin'];
// $messages['index_admin']=true;
        echo '
	<div class="container_menue parente">
        
            <div id="t_container_1" class="container_transparent container_visible" onclick="montre(\'container_1\');">Site</div>
            <div id="t_container_2" class="container_transparent" onclick="montre(\'container_2\');">Forum</div>
            <div id="t_container_3" class="container_transparent" onclick="montre(\'container_3\');">Base de données</div>
            <div id="t_container_4" class="container_transparent" onclick="montre(\'container_4\');">Tutos</div>
            <div id="t_container_5" class="container_transparent" onclick="montre(\'container_5\');">Partenaire</div>
            <div id="t_container_6" class="container_transparent" onclick="montre(\'container_6\');">Réglement du site</div>
            <div id="t_container_7" class="container_transparent" onclick="montre(\'container_7\');">FAQ</div>

        </div>

        <div id="container_1" style="display:block">

            <div class="sous_container_border_top"></div>
            <div class="sous_container_border_bottom11"></div>
            <div class="sous_container_border_left"></div>

            <div class="container_menue parente">
            
                <div id="t_container-1_1" class="container_transparent container_visible" onclick="montre(\'container-1_1\');">Administration du site</div>
                <div id="t_container-1_2" class="container_transparent" onclick="montre(\'container-1_2\');">Activiter</div>
                <div id="t_container-1_3" class="container_transparent" onclick="montre(\'container-1_3\');">Newsletters</div>
                <div id="t_container-1_4" class="container_transparent" onclick="montre(\'container-1_4\');">News</div>
                <div id="t_container-1_5" class="container_transparent" onclick="montre(\'container-1_5\');">Sondage</div>
                <div id="t_container-1_6" class="container_transparent" onclick="montre(\'container-1_6\');">Calendrier</div>
                <div id="t_container-1_7" class="container_transparent" onclick="montre(\'container-1_7\');">Chat</div>
                <div id="t_container-1_8" class="container_transparent" onclick="montre(\'container-1_8\');">Vidéo</div>
            
            </div>
            
        </div>

        <div id="container_2" style="display:none">

            <div class="sous_container_border_top"></div>
            <div class="sous_container_border_bottom14"></div>
            <div class="sous_container_border_left"></div>

            <div class="container_menue parente">
            
                <div id="t_container-2_1" class="container_transparent container_visible" onclick="montre(\'container-2_1\');">Administration du forum</div>
                <div id="t_container-2_2" class="container_transparent" onclick="montre(\'container-2_2\');">Auto Réponse</div>
                <div id="t_container-2_3" class="container_transparent" onclick="montre(\'container-2_3\');">Membre</div>
                <div id="t_container-2_4" class="container_transparent" onclick="montre(\'container-2_4\');">Groupe</div>
                <div id="t_container-2_5" class="container_transparent" onclick="montre(\'container-2_5\');">Recrutement</div>
                <div id="t_container-2_6" class="container_transparent" onclick="montre(\'container-2_6\');">Design</div>
            
            </div>
            
        </div>

        <!-- TODO : Container_3 -->

        <div id="container_4" style="display:none">

            <div class="sous_container_border_top"></div>
            <div class="sous_container_border_bottom15"></div>
            <div class="sous_container_border_left"></div>

            <div class="container_menue parente">

                <div id="t_container-4_1" class="container_transparent container_visible" onclick="montre(\'container-4_1\');">Programation</div>
                <div id="t_container-4_2" class="container_transparent" onclick="montre(\'container-4_2\');">Cours</div>
                <div id="t_container-4_3" class="container_transparent" onclick="montre(\'container-4_3\');">Listes</div>

            </div>
            
        </div>


';



// module d'admin

$admin_module=array(1=>'admin',2=>'activites',3=>'newsletter',4=>'news',5=>'sondage',6=>'calendrier',7=>'chat',8=>'video',9=>'forum',10=>'membre',11=>'groupes',12=>'recrutement',13=>'designs' );

////////,16=>'cours',17=>'liste'

//                    9=>'forum',10=>'membre',11=>'groupes',12=>'recrutement', 13=>'designs',
	//				14=>'bdd',
		//			15=>'tuto',16=>'cours',17=>'liste',
			//		18=>'partenaire'



//$admin_module=array(1=>'admin',2=>'activites',3=>'newsletter',4=>'news',5=>'sondage',6=>'calendrier',7=>'chat',9=>'bdd',
     //               8=>'video',9=>'forum',10=>'membre',11=>'groupes',12=>'recrutement', 13=>'designs');
/*, 5=>'partenaire', 6=>'faq', 7=>'activites',
                    8=>'newsletter', 9=>'news', 10=>'sondage', 11=>'calendrier', 12=>'chat', 13=>'video',
                    14=>'membre', 15=>'groupes', 16=>'recrutement', 17=>'designs', 18=>'liste');
*/


$dir = opendir(DIR_MODULE.'/');

chmod(DIR_MODULE.'/',0777);

$file_list = array();
while($data = readdir($dir))
{
        if(!preg_match("#(.+)\.#",$data))
        {	

                $file =  getcwd() . '/' . DIR_MODULE . '/' . $data . '/' . $data . '.admin.php';
				//var_dump($file);
                if(@file_exists($file))
                {
                   // if(array_search($data, $admin_module))
                        $file_list[] = $file;
                }
        }
}

sort($file_list);
$display = '';
foreach($file_list as $file){
		$display = '';
            include_once $file;
			echo $display;
}

//leprojet_var_debug($file_list);

?>